package com.hyz.reggie.controller;

import com.hyz.reggie.pojo.AcquireExecption;
import com.hyz.reggie.pojo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExcptionAdvice {

    @ExceptionHandler(AcquireExecption.class)
    public R ex(AcquireExecption ac) {
        return R.error(ac.getMessage());
    }

}
